package mvc.model.service.impl;

import mvc.model.dao.ProductDao;
import mvc.model.dao.impl.ProductDaoImpl;
import mvc.model.pojos.PictureBean;
import mvc.model.pojos.ProductBean;
import mvc.model.pojos.RomBean;
import mvc.model.service.ProductService;
import mvc.model.vo.ColorVO;
import mvc.model.vo.HeadProductVO;
import mvc.model.vo.ProListBean;

import java.util.List;

public class ProductServiceImpl implements ProductService {
    private static ProductDao productDao = new ProductDaoImpl();
    @Override
    public List<ProductBean> queryByName(String pname) {
        return productDao.queryByName(pname);
    }

    @Override
    public ProductBean queryById(int pid) {
        return productDao.queryById(pid);
    }

    @Override
    public List<HeadProductVO> findSome() {
        return productDao.findSome();
    }

    @Override
    public List<ColorVO> getColor(String pname) {
        return productDao.getColor(pname);
    }

    @Override
    public List<RomBean> getRom(String pname) {
        return productDao.getRom(pname);
    }

    @Override
    public List<PictureBean> getPicture(int pid) {
        return productDao.getPicture(pid);
    }

    @Override
    public List<PictureBean> queryPic(int cid, String pname) {
        return productDao.queryPic(cid,pname);
    }

    @Override
    public List<ProListBean> queryList() {
        return productDao.queryList();
    }

    @Override
    public List<ProListBean> queryProList(String index) {
        return productDao.queryProList(index);
    }
}
